Dynomotion

Group: DynoMotion Message: 7573 From: darrengladysz Date: 6/2/2013
Subject: Kmotion testing gantry axis with master/slave
Hi Tom,

I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.

I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.

I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.

After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.

What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.

Thank you

Darren
Group: DynoMotion Message: 7574 From: Tom Kerekes Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

It isn't clear what type of system you have.  Step/Dir Drives?  Analog Drives?  Open loop? Closed loop?  It would help if you attached your Initialization file.

But as I stated in the last email if you initialize the axis by setting the target Destination equal to the Encoder Position then the axis should not move.  Use:

EnableAxisDest(0,ch0->Position);

You must do this for both the Master and the Slave.

HTH
Regards
TK 


Group: DynoMotion Message: 7576 From: darrengladysz Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

I am using dac servo with encoders. I have delta ac servo drives which provide an encoder output for kflop.

I understand for the use of an init.c file in kmotioncnc but my issue is with kmotion when testing the axis. I do not believe I can use an init.c file with kmotion.

Regards,

Darren

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Darren,
>
> It isn't clear what type of system you have.  Step/Dir Drives?  Analog Drives?  Open loop? Closed loop?  It would help if you attached your Initialization file.
>
> But as I stated in the last email if you initialize the axis by setting the target Destination equal to the Encoder Position then the axis should not move.  Use:
>
> EnableAxisDest(0,ch0->Position);
>
> You must do this for both the Master and the Slave.
>
> HTH
> Regards
> TK 
>
>
>
> ________________________________
> From: darrengladysz <dgladysz@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, June 2, 2013 10:25 PM
> Subject: [DynoMotion] Kmotion testing gantry axis with master/slave
>
>
>
>  
> Hi Tom,
>
> I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
>
> I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
>
> I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
>
> After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
>
> What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
>
> Thank you
>
> Darren
>
Group: DynoMotion Message: 7577 From: Tom Kerekes Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

The "Enable" button on the Step Response screen should set the Destination to the current Encoder position and there should be no motion.

The problem may be related to your amplifier enable/disable with a digital output.  It isn't a good idea to enable the KFLOP Axis with the amplifier disabled because the servo may try to make a correction and if there is no response it may keep increasing the output to a huge value trying to make the correction.  Finally when you enable the Amplifier it my jump.  If you don't have an Integrator it usually isn't a problem (wind up).

You can actually use a Init.c program to initialize you system from KMotion if necessary.  But the Screen settings should match those in the C Program.

Please provide a step by step explanation of what you are doing and what happens.  And again screen shots of your settings would be helpful.

Regards
TK

Group: DynoMotion Message: 7578 From: darrengladysz Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

Thanks for the quick response.

I think the solution may be as simple as hitting the enable button in kmotion as this seems to do what I want, set the destination to the current encoder position. I presume this should also set the destination to the current encoder for the slave as well so that it is in sync with the master.

I was under the impression that hitting "set zero" in kmotion would also set the destination to the encoder position for the current axis and slave axis (if there is a slaved axis).

I have two enable outputs in kmotion for my drives. A first one to give power to all the drives and a second one "SON or servo on" to enable each drive independently. When an axis stalls, I cut power to all the drives to prevent one axis from moving while the other is stalled. I realized that it will be a good idea to parallel the SON and limits for the gantry axis as I do not want one motor to keep going when the other is stalled.

Is there a sample c program to monitor and/or stop all motion if a "fault" input from the drives goes high in Kflop.

Regards,

Darren


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Darren,
>
> The "Enable" button on the Step Response screen should set the Destination to the current Encoder position and there should be no motion.
>
> The problem may be related to your amplifier enable/disable with a digital output.  It isn't a good idea to enable the KFLOP Axis with the amplifier disabled because the servo may try to make a correction and if there is no response it may keep increasing the output to a huge value trying to make the correction.  Finally when you enable the Amplifier it my jump.  If you don't have an Integrator it usually isn't a problem (wind up).
>
>
> You can actually use a Init.c program to initialize you system from KMotion if necessary.  But the Screen settings should match those in the C Program.
>
>
> Please provide a step by step explanation of what you are doing and what happens.  And again screen shots of your settings would be helpful.
>
>
> Regards
> TK
>
>
>
> ________________________________
> From: darrengladysz <dgladysz@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, June 3, 2013 9:34 AM
> Subject: [DynoMotion] Re: Kmotion testing gantry axis with master/slave
>
>
>
>  
> Hi Tom,
>
> I am using dac servo with encoders. I have delta ac servo drives which provide an encoder output for kflop.
>
> I understand for the use of an init.c file in kmotioncnc but my issue is with kmotion when testing the axis. I do not believe I can use an init.c file with kmotion.
>
> Regards,
>
> Darren
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Darren,
> >
> > It isn't clear what type of system you have.  Step/Dir Drives?  Analog Drives?  Open loop? Closed loop?  It would help if you attached your Initialization file.
> >
> > But as I stated in the last email if you initialize the axis by setting the target Destination equal to the Encoder Position then the axis should not move.  Use:
> >
> > EnableAxisDest(0,ch0->Position);
> >
> > You must do this for both the Master and the Slave.
> >
> > HTH
> > Regards
> > TK 
> >
> >
> >
> > ________________________________
> > From: darrengladysz <dgladysz@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, June 2, 2013 10:25 PM
> > Subject: [DynoMotion] Kmotion testing gantry axis with master/slave
> >
> >
> >
> >  
> > Hi Tom,
> >
> > I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
> >
> > I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
> >
> > I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
> >
> > After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
> >
> > What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
> >
> > Thank you
> >
> > Darren
> >
>
Group: DynoMotion Message: 7579 From: Tom Kerekes Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

The "Zero" button only zeros the selected axis.  That may be the problem.  Say the Master axis's Destination is currently at 10 inches and you Zero the Master's Position and Destination.  The Slave will see that as a big jump in position and try to follow it.   I'm not sure why you would need to do that, but if you do you should de-slave the axes, Zero the Master, and then re-slave the axes.

There is an example watchenables_disableall.c also watchenable.c

You might also set a small Max Following Error so if you do something strange that results in a sudden big jump in the servo destination it would immediately generate a fault.

HTH
Regards
TK

Group: DynoMotion Message: 7580 From: darrengladysz Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

Thanks for the prompt and thorough information. I will try this and let you know.

BTW the reasons I need this is due to the slave axis stalling midway through the move during testing and the need to reset it in kmotion.

Regards,

Darren


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Darren,
>
> The "Zero" button only zeros the selected axis.  That may be the problem.  Say the Master axis's Destination is currently at 10 inches and you Zero the Master's Position and Destination.  The Slave will see that as a big jump in position and try to follow it.   I'm not sure why you would need to do that, but if you do you should de-slave the axes, Zero the Master, and then re-slave the axes.
>
> There is an example watchenables_disableall.c also watchenable.c
>
>
> You might also set a small Max Following Error so if you do something strange that results in a sudden big jump in the servo destination it would immediately generate a fault.
>
> HTH
> Regards
> TK
>
>
>
> ________________________________
> From: darrengladysz <dgladysz@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, June 3, 2013 11:38 AM
> Subject: [DynoMotion] Re: Kmotion testing gantry axis with master/slave
>
>
>
>  
> Hi Tom,
>
> Thanks for the quick response.
>
> I think the solution may be as simple as hitting the enable button in kmotion as this seems to do what I want, set the destination to the current encoder position. I presume this should also set the destination to the current encoder for the slave as well so that it is in sync with the master.
>
> I was under the impression that hitting "set zero" in kmotion would also set the destination to the encoder position for the current axis and slave axis (if there is a slaved axis).
>
> I have two enable outputs in kmotion for my drives. A first one to give power to all the drives and a second one "SON or servo on" to enable each drive independently. When an axis stalls, I cut power to all the drives to prevent one axis from moving while the other is stalled. I realized that it will be a good idea to parallel the SON and limits for the gantry axis as I do not want one motor to keep going when the other is stalled.
>
> Is there a sample c program to monitor and/or stop all motion if a "fault" input from the drives goes high in Kflop.
>
> Regards,
>
> Darren
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Darren,
> >
> > The "Enable" button on the Step Response screen should set the Destination to the current Encoder position and there should be no motion.
> >
> > The problem may be related to your amplifier enable/disable with a digital output.  It isn't a good idea to enable the KFLOP Axis with the amplifier disabled because the servo may try to make a correction and if there is no response it may keep increasing the output to a huge value trying to make the correction.  Finally when you enable the Amplifier it my jump.  If you don't have an Integrator it usually isn't a problem (wind up).
> >
> >
> > You can actually use a Init.c program to initialize you system from KMotion if necessary.  But the Screen settings should match those in the C Program.
> >
> >
> > Please provide a step by step explanation of what you are doing and what happens.  And again screen shots of your settings would be helpful.
> >
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: darrengladysz <dgladysz@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, June 3, 2013 9:34 AM
> > Subject: [DynoMotion] Re: Kmotion testing gantry axis with master/slave
> >
> >
> >
> >  
> > Hi Tom,
> >
> > I am using dac servo with encoders. I have delta ac servo drives which provide an encoder output for kflop.
> >
> > I understand for the use of an init.c file in kmotioncnc but my issue is with kmotion when testing the axis. I do not believe I can use an init.c file with kmotion.
> >
> > Regards,
> >
> > Darren
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Darren,
> > >
> > > It isn't clear what type of system you have.  Step/Dir Drives?  Analog Drives?  Open loop? Closed loop?  It would help if you attached your Initialization file.
> > >
> > > But as I stated in the last email if you initialize the axis by setting the target Destination equal to the Encoder Position then the axis should not move.  Use:
> > >
> > > EnableAxisDest(0,ch0->Position);
> > >
> > > You must do this for both the Master and the Slave.
> > >
> > > HTH
> > > Regards
> > > TK 
> > >
> > >
> > >
> > > ________________________________
> > > From: darrengladysz <dgladysz@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Sunday, June 2, 2013 10:25 PM
> > > Subject: [DynoMotion] Kmotion testing gantry axis with master/slave
> > >
> > >
> > >
> > >  
> > > Hi Tom,
> > >
> > > I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
> > >
> > > I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
> > >
> > > I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
> > >
> > > After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
> > >
> > > What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
> > >
> > > Thank you
> > >
> > > Darren
> > >
> >
>
Group: DynoMotion Message: 7581 From: Tom Kerekes Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

I don't think you should really need to change or reset the encoder position after a stall.  That is one of the nice things about having encoders.  Even during a fault or stall the encoders should track the position. 

But regardless of what the encoder positions are reading after a stall and fault, you should be able to enable both sides to servo to where they currently are.  Both encoder positions do not have to necessarily match.  

Here is a possible scenario:  Assume both axes have been homed, are at 0, are square, and slaved.  The Master is commanded to move 20 inches.  Both axes move along the same commanded trajectory.  After 9 inches of motion a fault occurs and both amplifiers are disabled.  The Master comes to a final stop with an encoder reading of 10.0 inches.  The Slave comes to a final stop with an encoder reading of 10.01inches (the axes are slightly twisted).  We could then enable the Master telling it to servo to destination 10.0.  Enable the Slave axis to servo to Destination 10.01.  Nothing should move.  We could then with the axes not slaved, move the Slave to a destination of 10.0.  This should square up the axes.  Then re-slave the axes.  Then tell the Master to move to position 20 inches and the final result should be no less accurate and square than if there was no stall.

HTH
Regards
TK

Group: DynoMotion Message: 7584 From: darrengladysz Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

I really appreciate your assistance and explanations.

I will take a few mintues to explain my setup just so you can comprehend how thins This is how my setup works. I am still in the process of finalizing the system so the setup is not yet complete.

1. Opto Out 1 - Jp13 activates a relay which gives power to the drives;
2. Relay Drivers Jp8 have one fet to enable each drive (there are 4);
3. I start up kmotion to test out my axis;
4. I open the digital I/o window and select the outputs (opto out 1 - jp13) to enable power to the servos;
5. I select the drives I want to test and enable this by selecting the appropriate relay driver on jp8; For x and slave I enable 0 and 3;
6. I configure axis 3 as slave with axis 0 as master and slave gain -1 and download this to kflop for channel 3;
7. I load motor config file in kmotion config&flash window and then download this to kflop;
8. I open the step response window and give a move. Normally this works without problem and the axis goes to the destination and comes back to the starting position;
9. If I enter a too high velocity or acc then one of my drive stalls prior to completing the move (usually it is the slave and there is a loud noise). If it is a master/slave setup for the gantry then the other non-stalled motor keeps going.
10. I quickly unckeck opto 1 out (jp 13 to cut power to the drives) to stop the running motor;
11. When power to the servos is removed, I manually resquare the gantry and repeat step 4. However, when I re-activate the servos, the slave axis attempts to complete the move or move somewhere and starts moving towards that position as soon as I re-activate power to the drives and this without me having given any motion command etc in kmotion. This happens if I hit setzero for both or either the master or the slave, whether I re-download the motor config files for each axis (master/slave) as in 6 and 7 prior to re-enabling power to the servos. I cannot say for sure but either the slave is trying to complete the move or it is trying to move to its previous position prior to me killing power to the drives. The master axis does not move in this case however.

I can send you my init.c file but I do not use this in kmotion, only the axis config file for each axis.

I suspect and will test later that the solution will be to use the enable/disable button and not the setzero button.

It is in this situation that I get the slave not synching with the master.

Regards,

Darren
Group: DynoMotion Message: 7587 From: Tom Kerekes Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

I think the main problem is that you are not using MaxFollowingError.  If you had a small Max Following Error then as soon as the Slave stalled it would Fault and both the Master and the Slave would be disabled.  But without a following error KFLOP thinks everything is acceptable and that the move successfully completed to the final destination and remains trying to servo to the final destination.  It has no idea that that you removed power.  It is still trying to reduce the error and move the motor to the final destination.   It knows there is a large error but the large MaxFollowingError is saying the error is acceptable and should not be a problem.  So as soon as you re-apply power the motor will continue to move.  You can verify all this by looking at the Axis screen.  Look if the axes 0 and 3 are still enabled and what the Destinations are.

Make sure both axes are disabled before you re-apply power and then re-enable them.

HTH
Regards
TK

Group: DynoMotion Message: 7588 From: darrengladysz Date: 6/3/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

A quick update.

I did some testing and I believe the issue is caused by some setting on my drives as the axis slowly moves forward when enable whether or not it is connected to kflop.

Either it is a setting on the drive or a short on the wiring.

Sorry about the long posts.

Regards,

Darren

--- In DynoMotion@yahoogroups.com, "darrengladysz" <dgladysz@...> wrote:
>
> Hi Tom,
>
> I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
>
> I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
>
> I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
>
> After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
>
> What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
>
> Thank you
>
> Darren
>
Group: DynoMotion Message: 7600 From: TK Date: 6/4/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

It is normal to have some slow drift with an analog signal of zero volts. Analog signals are not perfectly accurate (and do not need to be) with small offsets and noise. That is why the amplifier enables are needed. When the servo is enabled any small offset or noise won't matter because the servo feedback will correct for it. 

HTH
Regards
TK

On Jun 3, 2013, at 10:03 PM, "darrengladysz" <dgladysz@...> wrote:

 

Hi Tom,

A quick update.

I did some testing and I believe the issue is caused by some setting on my drives as the axis slowly moves forward when enable whether or not it is connected to kflop.

Either it is a setting on the drive or a short on the wiring.

Sorry about the long posts.

Regards,

Darren

--- In DynoMotion@yahoogroups.com, "darrengladysz" <dgladysz@...> wrote:
>
> Hi Tom,
>
> I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
>
> I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
>
> I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
>
> After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
>
> What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
>
> Thank you
>
> Darren
>

Group: DynoMotion Message: 7604 From: darrengladysz Date: 6/4/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Tom,

I do not mean to carry on endlessly on this subject but I believe I resolved the issue.

My drives were ok. Also I had max following error at 1000 encoder counts and I get approx. 30000 counts per inch.

Every time that there is a stall (providing I disabled the drives prior to the move completing) and prior to re-enabling my drives, I need to select the slave channel, load the motor file for this file from the harddrive, download it to kflop and then (always in this channel for the slave) disable and enable this channel. Once I am done with the slave, I then repeat this for the master.

If I do not do this, the slave wants to finish the move where it stalled and moves to this position right after the drive is enabled. The velocity is much slower than what I had asked however (if this can help).

Also in kmotion, I will check more but I do not believe the following error works for the slave as the numbers easily exceeded the 1000 counts. Can it be the following error only works after the axis goes to its initial position?

Also, if it may help in your understanding, the stall I refer to is not really a stall, I believe the pinion may temporarily jump out of the rack at times when accelerating too hard as I do not get an error code on the faulting drive, just makes one loud noise but keeps going. Needless to say, I quickly disable the drives upon this happening.

I have a 1500lbs gantry with twin 1.5 kw servos so it is kind of discomforting to have one side move when the other does not.

How can I load the init.c file in kmotion as I will need to write and enable a watchdog feature. Do I merely load it to Thread 1 in which case it will execute and any channel downloads will only overwrite the data for that particular channel? Also, do you have a c example of the slave doing a check of the master position and using this as a second condition for excess following error and vice versa? I guess this would only work if both the master and slave are initialized to the same position value but would give me some peace of mind :).

Can I replace the program that executes when I click the "move" command in the kmotion "step response" window with a c program and if so what file would I need to edit.

Regards and thanks for the patience,

Darren

--- In DynoMotion@yahoogroups.com, TK <tk@...> wrote:
>
> Hi Darren,
>
> It is normal to have some slow drift with an analog signal of zero volts. Analog signals are not perfectly accurate (and do not need to be) with small offsets and noise. That is why the amplifier enables are needed. When the servo is enabled any small offset or noise won't matter because the servo feedback will correct for it.
>
> HTH
> Regards
> TK
>
> On Jun 3, 2013, at 10:03 PM, "darrengladysz" <dgladysz@...> wrote:
>
> > Hi Tom,
> >
> > A quick update.
> >
> > I did some testing and I believe the issue is caused by some setting on my drives as the axis slowly moves forward when enable whether or not it is connected to kflop.
> >
> > Either it is a setting on the drive or a short on the wiring.
> >
> > Sorry about the long posts.
> >
> > Regards,
> >
> > Darren
> >
> > --- In DynoMotion@yahoogroups.com, "darrengladysz" <dgladysz@> wrote:
> > >
> > > Hi Tom,
> > >
> > > I do not know if I am doing something wrong but I am having some issues with Kmotion when testing master/slave axis.
> > >
> > > I am configuring the x axis on a 3 axis cnc router to which the a (channel 3) axis is slave to the x axis.
> > >
> > > I configured the channel 3 axis to be a slave to the x axis with a -1 gain. This works without problem. I am testing the systems limits for this axis and more specifically the velocity, acc and jerk. A few times I had one of the motors stall when I asked it to go to fast or to accelerate too fast at which time I immediately disable the drives to prevent damage to the gantry. At present the drive fault and limits are not set up in kmotion - but they will be when I am finished.
> > >
> > > After a stall (where I disabled the drives prior to the move completing) I re-load the axis configuration and download them again to kmotion and setzero on the master axis in the "step response screen". I then re-activate the drives with an output. Immediately upon power up the slave axis then races to its previous commanded position (where it had previously stalled) and is no longer in sync with the master. I gather I have to download info to kflop but am not sure how. I tried using setzero in the step response window for both the slave and master and downloading this but this does not seem to work. I then have to turn off the output to prevent my gantry from separating in two or having a few bolts torn off.
> > >
> > > What do I need to do to make sure that Kmotion resets both the master and slave to zero or to the same position after I de-activate and re-activate the drives so as to prevent the slave from racing away? In essence, I want to prevent the slave from attempting to reach its previous commanded position when it stalled and to stay in sync with the master when I re-activate the drives.
> > >
> > > Thank you
> > >
> > > Darren
> > >
> >
> >
>
Group: DynoMotion Message: 7607 From: Tom Kerekes Date: 6/5/2013
Subject: Re: Kmotion testing gantry axis with master/slave
Hi Darren,

No worries.  I appreciate your patience with this.

I'm a bit confused about what is happening and the final state after the "stall".  Are you sure you have a small Following error set on both the Master and the Slave?  It seems your solution is basically to disable and re-enable both axes (you should not need to reload the file).  But I can't understand how both axes could not already be disabled if you have a small following error setting and you have turned off the amplifiers.  The Max Following Error will trip whenever there is an error not just at the end of a move.  The next time you have a stall check the axis screen to see exactly what happened.  Which axes are enabled?  What are the commanded Destinations?  What are the measured encoder Positions?

Yes you can use a C Program to do things and then download parameters from the KMotion Screens to overwrite settings.

You shouldn't really need a program to watch the difference between the Master and the Slave because if they are both where they are supposed to be then it should be impossible to have a difference.  But I have attached a program if you wish to do this for extra safety.

You can not replace what the "Move" button on the Step Response Screen does.

HTH
Regards
TK